/*!
\copyright  Copyright (c) 2020 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief      Source file for the Headset Application user interface tone indications.
*/
#include "headset_tones.h"

/*! At the end of every tone, add a short rest to make sure tone mxing in the DSP doesn't truncate the tone */
#define RINGTONE_STOP  RINGTONE_NOTE(REST, HEMIDEMISEMIQUAVER), RINGTONE_END

const ringtone_note app_tone_button[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_button_2[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_button_3[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_button_4[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_button_factory_reset[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(A7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(C7, SEMIQUAVER),
    RINGTONE_NOTE(B7, SEMIQUAVER),
    RINGTONE_STOP
};

#ifdef INCLUDE_AV
const ringtone_note app_tone_av_connect[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_av_disconnect[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_av_remote_control[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_av_connected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D6,  SEMIQUAVER),
    RINGTONE_NOTE(A6,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_av_disconnected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A6,  SEMIQUAVER),
    RINGTONE_NOTE(D6,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_av_link_loss[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_a2dp_not_routed[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_gaming_mode_on[] =
{
    RINGTONE_TIMBRE(plucked), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D6, HEMIDEMISEMIQUAVER),
    RINGTONE_NOTE(G6, HEMIDEMISEMIQUAVER),
    RINGTONE_NOTE(B6, HEMIDEMISEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_gaming_mode_off[] =
{
    RINGTONE_TIMBRE(plucked), RINGTONE_DECAY(16),
    RINGTONE_NOTE(B6, HEMIDEMISEMIQUAVER),
    RINGTONE_NOTE(G6, HEMIDEMISEMIQUAVER),
    RINGTONE_NOTE(D6, HEMIDEMISEMIQUAVER),
    RINGTONE_STOP
};

#endif

const ringtone_note app_tone_hfp_connect[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_connected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D6,  SEMIQUAVER),
    RINGTONE_NOTE(A6,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_disconnected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A6,  SEMIQUAVER),
    RINGTONE_NOTE(D6,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_link_loss[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_sco_connected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(AS5, DEMISEMIQUAVER),
    RINGTONE_NOTE(DS6, DEMISEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_sco_disconnected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(DS6, DEMISEMIQUAVER),
    RINGTONE_NOTE(AS5, DEMISEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_mute_reminder[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_sco_unencrypted_reminder[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(B5, SEMIQUAVER),
    RINGTONE_NOTE(B5, SEMIQUAVER),
    RINGTONE_NOTE(B5, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_ring[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(B6,   SEMIQUAVER),
    RINGTONE_NOTE(G6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(REST, SEMIQUAVER),
    RINGTONE_NOTE(B6,   SEMIQUAVER),
    RINGTONE_NOTE(G6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_ring_caller_id[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(B6,   SEMIQUAVER),
    RINGTONE_NOTE(G6,   SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_voice_dial[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_voice_dial_disable[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_answer[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_hangup[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_mute_active[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(CS7, SEMIQUAVER),
    RINGTONE_NOTE(DS7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_mute_inactive[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(DS7, SEMIQUAVER),
    RINGTONE_NOTE(CS7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_hfp_talk_long_press[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_pairing[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_paired[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A6, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_pairing_deleted[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(A6, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_volume[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_volume_limit[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_NOTE(D7, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_error[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(B5, SEMIQUAVER),
    RINGTONE_NOTE(B5, SEMIQUAVER),
    RINGTONE_NOTE(B5, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_battery_empty[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(B6, SEMIQUAVER),
    RINGTONE_NOTE(B6, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_power_on[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(CS5, SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_power_off[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_NOTE(D5,  SEMIQUAVER),
    RINGTONE_NOTE(CS5, SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_paging_reminder[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_STOP
};

#ifdef INCLUDE_AMA

const ringtone_note app_tone_ama_unregistered[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(G5,  SEMIQUAVER),
    RINGTONE_NOTE(A5,  SEMIQUAVER),
    RINGTONE_NOTE(F4,  SEMIQUAVER),
    RINGTONE_NOTE(F5,  SEMIQUAVER),
    RINGTONE_NOTE(C5,  QUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_ama_not_connected[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),
    RINGTONE_NOTE(G5,  SEMIQUAVER),
    RINGTONE_NOTE(G5,  SEMIQUAVER),
    RINGTONE_NOTE(G5,  SEMIQUAVER),
    RINGTONE_NOTE(E5,  QUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_ama_privacy_mode_disabled[] =
{
    RINGTONE_TIMBRE(sine),
    RINGTONE_DECAY(16),
    RINGTONE_NOTE(G6, DEMISEMIQUAVER),
    RINGTONE_NOTE(G6, DEMISEMIQUAVER),
    RINGTONE_NOTE(C7, SEMIQUAVER),
    RINGTONE_NOTE(REST, HEMIDEMISEMIQUAVER),
    RINGTONE_END
};

const ringtone_note app_tone_ama_privacy_mode_enabled[] =
{
    RINGTONE_TIMBRE(sine),
    RINGTONE_DECAY(16),
    RINGTONE_NOTE(G6, DEMISEMIQUAVER),
    RINGTONE_NOTE(G6, DEMISEMIQUAVER),
    RINGTONE_NOTE(C6, SEMIQUAVER),
    RINGTONE_NOTE(REST, HEMIDEMISEMIQUAVER),
    RINGTONE_END
};
#endif  /* INCLUDE_AMA */

#ifdef INCLUDE_ACCESSORY_TRACKING
/* These are all defined as "loud" tones, which means they play at a base
 * volume much much louder than the normal tones. */
const ringtone_note app_tone_accessory_tracking_ut[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),

    RINGTONE_VOLUME(64),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(96),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(128),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(160),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(192),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(224),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_END
};

const ringtone_note app_tone_accessory_tracking[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),

    RINGTONE_VOLUME(64),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(96),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(128),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(128),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(160),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(192),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_VOLUME(224),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),

    RINGTONE_NOTE(REST, SEMIQUAVER),

    RINGTONE_END
};

const ringtone_note app_tone_accessory_tracking_keep_playing_ut[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),

    RINGTONE_VOLUME(255),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D6,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D7,   SEMIQUAVER),
    RINGTONE_NOTE(D8,   DEMISEMIQUAVER),
    RINGTONE_NOTE(D8,   SEMIQUAVER),
    RINGTONE_STOP
};

const ringtone_note app_tone_accessory_tracking_keep_playing[] =
{
    RINGTONE_TIMBRE(sine), RINGTONE_DECAY(16),

    RINGTONE_VOLUME(255),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_NOTE(F7,   SEMIQUAVER),
    RINGTONE_STOP
};
#endif/* INCLUDE_ACCESSORY_TRACKING */
